﻿@{
    Layout = "~/Views/Samples/Generic/_Index.cshtml";
}

@SampleHelper.RenderCode(SampleHelper.VaryByLanguage("Krystalware.SlickUpload.Configuration.UploadStreamProviderElement configElement = SlickUploadContext.Config.UploadProfiles[\"s3\"].UploadStreamProvider;", "Dim configElement As Krystalware.SlickUpload.Configuration.UploadStreamProviderElement = SlickUploadContext.Config.UploadProfiles(\"s3\").UploadStreamProvider"), includeRazorBrackets: true)
@SampleHelper.RenderCode(SampleHelper.VaryByLanguage(
    "if (string.IsNullOrEmpty(configElement.Parameters[\"accessKeyId\"]) || string.IsNullOrEmpty(configElement.Parameters[\"secretAccessKey\"]) || string.IsNullOrEmpty(configElement.Parameters[\"bucketName\"])) {",
    "If string.IsNullOrEmpty(configElement.Parameters(\"accessKeyId\")) OrElse string.IsNullOrEmpty(configElement.Parameters(\"secretAccessKey\")) OrElse string.IsNullOrEmpty(configElement.Parameters(\"bucketName\")) Then")
)    
<div id="errorMessage" style="border:1px solid #c00;padding:.5em;margin-bottom:1em;">
    <b style="color:#f00">ERROR:</b> Please enter your Amazon S3 credentials and bucket name in the uploadStreamProvider section of the s3 uploadProfile in the web.config to enable this sample. The bucket name you specify must already exist.
</div>
@SampleHelper.RenderCode(SampleHelper.VaryByLanguage("}", "End If"), true)